<template>
	<div class="detailView">
		<div class="bottomView">
			<el-button type="primary" @click="back">返回</el-button>
			<div class="detail">
				<h4>用户名:</h4>
				<span>{{ newslist.username }}</span>
			</div>
			<div class="detail">
				<h4>电话:</h4>
				<span>{{ newslist.tel }}</span>
			</div>
			<div class="detail">
				<h4>地址:</h4>
				<span>{{ newslist.address  }}</span>
			</div>
		</div>

	</div>
</template>

<script>
import {getUser} from "@/api/StaticPro"
export default {
	data() {
		return {
			// baseUrl: require("../assets/baseUrl.js").baseUrl,
			newslist: [],
			adress: "",
			username:""
		}
	},
	methods: {
		back() {
			this.$router.push('/admin/staticsproject')
		},
		async getUser() { 
					await getUser("/sale/getUser?username="+this.username).then(res=>{
						console.log(res)
						this.newslist=res.data.user[0]
				})
			},
	},
	mounted() {
		this.username=this.$route.query.username
		console.log(this.username)
		this.getUser()
	}
}
</script>

<style lang="less">
.detailView {
	display: flex;
	flex-direction: column;

	.bottomView {
		display: flex;
		flex-direction: column;
		width: 80vw;
		margin-left: 30px;

		.el-button {
			width: 80px;
			height: 40px;
			margin-bottom: 20px;
			font-size: 20px;
			border-radius: 10px;
			line-height: 15px;
		}

		.detail {
			display: flex;
			line-height: 45px;

			h4 {
				font-size: 24px;
				width: 100px;
				text-align: left;
			}

			span {
				font-size: 20px;
				color: #999;
			}
		}
	}

}
</style>